package com.prbqb.pojo;

import lombok.Data;

@Data
public class PageBo {

    public static Integer currentPage = 1;

    public static Integer totalPage = 1;

    public static Integer defaultPageSize = 5;

    public static Integer firstPage(){

        currentPage = 1;
        return  currentPage;

    }

    public static Integer prePage(){

        if(currentPage != 1){
            currentPage --;
        }
        return currentPage;
    }

    public static Integer nextPage(){

        if(currentPage >= totalPage){
            currentPage = totalPage;
        }else{
            currentPage ++;
        }
        return currentPage;
    }

    public static Integer lastPage(){

        currentPage = totalPage;
        return currentPage;
    }

    public static void main(String[] args) {
        System.out.println(!currentPage.equals(totalPage));
    }

}
